package com.waterdp.qdspr;

import android.app.Application;
import android.os.Bundle;
import android.os.StrictMode;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import io.flutter.embedding.android.FlutterActivity;
import io.flutter.embedding.engine.FlutterEngine;
import io.flutter.plugin.common.BinaryMessenger;
import io.flutter.plugin.platform.PlatformViewRegistry;

public class MainActivity extends FlutterActivity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
        StrictMode.setThreadPolicy(policy);
    }

    @Override
    public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) {
        super.configureFlutterEngine(flutterEngine);
        final PlatformViewRegistry registry = flutterEngine.getPlatformViewsController().getRegistry();
        final Application application = getApplication();
        final BinaryMessenger messenger = flutterEngine.getDartExecutor().getBinaryMessenger();
//        registry.registerViewFactory("qdspr_zsyk_flutter.io/map_trail_view", new MapTrailViewFactory(messenger));
    }
}
